package org.lv.learning.web;

import org.lv.learning.entity.Order;
import org.lv.learning.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @PutMapping("/create")
    public Integer createOrder(@RequestBody Order order){
        return orderService.createOrder(order);
    }

}
